<template>
  <div class="h-full m-relative w-full">
    <div class="p-20 h-full overflow-y-auto w-full">
      <a-steps :current="-1" type="dot" direction="vertical" class="w-full">
        <a-step v-for="item in steps" :key="item.id" class="w-full overflow-hidden">
          <div class="flex-col w-full">
            <div class="flex w-full">
              <span class="text333">{{ item.content }}</span>
              <span class="text-theme ml-m cursor-pointer" v-if="item.batchId" @click="onDetails(item)">预览数据></span>
              <span class="text999 text-size-12 ml-m line-h-32">{{ item.applicant }}</span>
              <span class="text999 text-size-12 ml-m line-h-32">{{ item.createdAt }}</span>
            </div>
            <div class="mt-6 text666 text-size-14 ww overflow-hidden" v-if="item.remark">{{ item.remark }}</div>
            <div class="mt-6 flex flex-wrap pb-10 w-full" v-if="item.images && item.images.length">
              <a-image
                v-for="(img, index) in item.images"
                :key="index"
                :src="img"
                class="mr-14"
                :width="100"
                :height="100"
              ></a-image>
            </div>
          </div>
        </a-step>
      </a-steps>
    </div>
  </div>
</template>

<script setup>
import { batchTaskGetLog } from '@/apis'
const props = defineProps(['params', 'onClose'])
const router = useRouter()
const steps = ref([])
onMounted(async () => {
  const res = await batchTaskGetLog({ settleId: props.params.id })
  steps.value = res.data
})
const onDetails = (item) => {
  router.push({
    name: 'rewardDetailsJdSuperSubsidy',
    query: { id: item?.id, batchId: item.batchId, updatedTime: item.updatedAt }
  })
}
</script>
<style scoped lang="scss">
.textd43030 {
  color: #d43030;
}
.table2 {
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  margin: $margin;
  background: var(--color-bg-1);
  padding: $padding;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ww {
  word-wrap: break-word;
  white-space: normal;
}
</style>
